import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'  
import 'element-plus/dist/index.css'
import router from './router'//路由
import * as ElementPlusIconsVue from '@element-plus/icons-vue'//图标
import './assets/main.css';
import axios from "axios";//http请求
import { createPinia } from 'pinia'//vue状态管理
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'//状态管理持久化
import { ElMessage } from 'element-plus'//消息提醒
import zhCn from 'element-plus/dist/locale/zh-cn.mjs';

const app = createApp(App)
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(pinia)
app.use(router)
app.use(ElementPlus, {
  locale: zhCn,
})
app.mount('#app')
